#include "QtDebug.h"

QDebug operator << (QDebug dbg, const PRef ref)
{
    string str = ref.reportAndFlushToStr();
    dbg << QSTR("\n" + str);
    return dbg;
}

QDebug operator << (QDebug dbg, const SpecParam sp)
{
    string str = sp.reportAndFlushToStr();
    dbg << QSTR("\n" + str);
    return dbg;
}

QDebug operator << ( QDebug dbg, const SpecParamL* sp )
{
    string str = sp->reportAndFlushToStr();
    dbg << QSTR("\n" + str);
    return dbg;
}

QDebug operator << (QDebug dbg, const TempiRitorno& tr)
{
    string str = tr.reportAndFlushToStr();
    dbg << QSTR("\n" + str);
    return dbg;
}

QDebug operator << (QDebug dbg, const TempiRitornoL* trl)
{
    string str = trl->reportAndFlushToStr();
    dbg << QSTR("\n" + str);
    return dbg;
}

QDebug operator << (QDebug dbg, const SpecDesignL* sdl)
{
    string str = sdl->reportAndFlushToStr();
    dbg << QSTR("\n" + str);
    return dbg;
}

QDebug operator << (QDebug dbg, const PFileItem& item)
{
    string str = item.reportAndFlushToStr();
    dbg << QSTR("\n" + str);
    return dbg;
}

QDebug operator << (QDebug dbg, const PKeyItem &key)
{
    dbg << QSTR("\n" + key.reportAndFlushToStr());
    return dbg;
}

QDebug operator << (QDebug dbg, const TpSpecDesign& ts)
{
    QString str, str_nome, str_obj;
    str_obj = "TpSpecDesign";
    str_nome = QString("      Debug Oggetto -------> [%1]").arg(str_obj);
    str.append(str_nome).append("\n");
    dbg << str;
    dbg << "Flag  = "
        << ts.getFlag()
        << " FlagStr = "
        << QSTR(ts.getFlagStr())
        << " IsSet = "
        << ts.isSetFlag()
        << "\n";
    dbg << QString("FINE Debug Oggetto -------> [%1]\n").arg(str_obj);
    return dbg;
}

QDebug operator << (QDebug dbg, const SpecDesign& sd)
{
    string str = sd.reportAndFlushToStr();
    dbg << QSTR("\n" + str);
    return dbg;
}

QDebug operator << (QDebug dbg, const SeismicGrid& grid)
{
    string str = grid.reportAndFlushToStr();
    dbg << QSTR("\n" + str);
    return dbg;
}
